﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
					xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic">
	<Style TargetType="{x:Type Window}">
		<Setter Property="SnapsToDevicePixels" Value="True"/>
		<Setter Property="Background">
			<Setter.Value>
				<LinearGradientBrush EndPoint="1,1" StartPoint="0.0,0.0">
					<GradientStop Color="Silver" Offset="0.5" />
					<GradientStop Color="Black" Offset="1" />
				</LinearGradientBrush>
			</Setter.Value>
		</Setter>
	</Style>
	
	

	<Style x:Key="MyButtonGlowStyle" TargetType="{x:Type Button}">
		<!--<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>-->
		<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
		<Setter Property="BorderBrush" Value="{x:Static Microsoft_Windows_Themes:ClassicBorderDecorator.ClassicBorderBrush}"/>
		<Setter Property="BorderThickness" Value="3"/>
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="Foreground" Value="White"/>
		<Setter Property="Padding" Value="0,0,1,1"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<ControlTemplate.Resources>
						<Storyboard x:Key="MouseEnter">
							<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="glow">
								<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0.8"/>
							</DoubleAnimationUsingKeyFrames>
							<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="glass">
								<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/>
							</DoubleAnimationUsingKeyFrames>
						</Storyboard>
						<Storyboard x:Key="MouseLeave">
							<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="glow">
								<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0.01"/>
							</DoubleAnimationUsingKeyFrames>
							<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="glass">
								<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="0.99"/>
							</DoubleAnimationUsingKeyFrames>
						</Storyboard>
					</ControlTemplate.Resources>
					<Grid Margin="0,0,0,0">
						<Rectangle x:Name="base_color" RadiusY="6" RadiusX="6" Fill="Black" />
						<Rectangle x:Name="glow" RadiusY="6" RadiusX="6" Opacity="0">
							<Rectangle.Fill>
								<RadialGradientBrush Center="0.493,0.975" GradientOrigin="0.493,0.975" RadiusY="0.838" RadiusX="0.838">
									<GradientStop Color="#002C26EF" Offset="0.082"/>
									<GradientStop Color="White" Offset="1"/>
								</RadialGradientBrush>
							</Rectangle.Fill>
						</Rectangle>
						<Rectangle x:Name="glass" RadiusY="6" RadiusX="6" Cursor="Hand">
							<Rectangle.Fill>
								<LinearGradientBrush EndPoint="0.498,0" StartPoint="0.499,0.699">
									<GradientStop Color="#00000000" Offset="0"/>
									<GradientStop Color="White" Offset="1"/>
									<GradientStop Color="#AEB4B4B4" Offset="0.682"/>
									<GradientStop Color="#25262626" Offset="0.614"/>
								</LinearGradientBrush>
							</Rectangle.Fill>
						</Rectangle>
						<ContentPresenter Margin="0" HorizontalAlignment="Center" VerticalAlignment="Center" 
										  x:Name="content"/>
					</Grid>
					<ControlTemplate.Triggers>
						<EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="glass">
							<BeginStoryboard x:Name="MouseLeave_BeginStoryboard" Storyboard="{StaticResource MouseLeave}"/>
						</EventTrigger>
						<EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="glass">
							<BeginStoryboard Storyboard="{StaticResource MouseEnter}"/>
						</EventTrigger>
						<EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="content">
							<BeginStoryboard Storyboard="{StaticResource MouseEnter}"/>
						</EventTrigger>
						<EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="content">
							<BeginStoryboard x:Name="MouseLeave_BeginStoryboard2" Storyboard="{StaticResource MouseLeave}"/>
						</EventTrigger>
						<Trigger Property="IsKeyboardFocused" Value="true"/>
						<Trigger Property="IsDefaulted" Value="true"/>
						<Trigger Property="IsPressed" Value="true"/>
						<Trigger Property="ToggleButton.IsChecked" Value="true"/>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<LinearGradientBrush x:Key="fillBrush" StartPoint="0,0" EndPoint="0,1">
		<GradientStop Offset="0" >
			<GradientStop.Color>
				<Color A="255" R="0" G="84" B="154"></Color>
			</GradientStop.Color>
		</GradientStop>
		<GradientStop Offset="1" >
			<GradientStop.Color>
				<Color A="255" R="2" G="24" B="84"></Color>
			</GradientStop.Color>
		</GradientStop>
	</LinearGradientBrush>


	<LinearGradientBrush x:Key="windowBrush" StartPoint="0,0" EndPoint="0,1">
		<GradientStop Offset="0">
			<GradientStop.Color>
				<Color A="255" R="120" G="163" B="195"></Color>
			</GradientStop.Color>
		</GradientStop>
		<GradientStop Offset="0.5" >
			<GradientStop.Color>
				<Color A="255" R="214" G="222" B="235"></Color>
			</GradientStop.Color>
		</GradientStop>
		<GradientStop Offset="1">
			<GradientStop.Color>
				<Color A="255" R="120" G="163" B="195"></Color>
			</GradientStop.Color>
		</GradientStop>
	</LinearGradientBrush>

	<SolidColorBrush x:Key="sliderBrush">
		<SolidColorBrush.Color>
			<Color A="255" R="217" G="227" B="239"/>
		</SolidColorBrush.Color>
	</SolidColorBrush>

	<Style x:Key="closeButton" TargetType="{x:Type Button}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<Grid>
						<Rectangle Stretch="Fill" Fill="Transparent"></Rectangle>
						<Line Name="line1" X1="0" Y1="0" X2="8" Y2="8" Stroke="White" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Bottom"></Line>
						<Line Name="line2" X1="8" Y1="0" X2="0" Y2="8" Stroke="White" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Bottom"></Line>
					</Grid>
					<ControlTemplate.Triggers>
						<Trigger Property="Button.IsMouseOver" Value="True">
							<Setter TargetName="line1" Property="Stroke" Value="{StaticResource fillBrush}"/>
							<Setter TargetName="line2" Property="Stroke" Value="{StaticResource fillBrush}"/>
						</Trigger>
						<Trigger Property="Button.IsPressed" Value="True">
							<Setter Property="RenderTransform" TargetName="line1">
								<Setter.Value>
									<TranslateTransform X="1" Y="1"/>
								</Setter.Value>
							</Setter>
							<Setter Property="RenderTransform" TargetName="line2">
								<Setter.Value>
									<TranslateTransform X="1" Y="1"/>
								</Setter.Value>
							</Setter>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>




</ResourceDictionary>